package com.student.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;


@Controller
public class MainController {

    @RequestMapping(value = {"/home", "/"})
    public String homepage() {
//        return "home";
        return "Manage_welcome";
    }

    @RequestMapping(value = "/loginPage")
    public String login() {
        return "login";
    }

    @RequestMapping(value = "/registerPage")
    public String register() {
        return "register";
    }

    @RequestMapping(value = "/userManagement")
    public String userManagement() {
        return "userManagement";
    }

    @RequestMapping(value = "/releaseNewsPage")
    public String releaseNews() {
        return "releaseNews";
    }

    @RequestMapping(value = "/addQuestions")
    public String addQuestions() {
        return "addQuestion";
    }

    @RequestMapping(value = "/testPage")
    public String test() {
        return "/test";
    }

    //信息录入跳转
    @RequestMapping(value = "/sportIndex")
    public String sportIndex() {
        return "sportIndex";
    }

    //查询跳转
    @RequestMapping(value = "/sportIndexSelect")
    public String sportIndexSelect() {
        return "sportIndexSelect";
    }

    //返回跳转
    @RequestMapping(value = "/re")
    public String re() {
        return "home";
    }

    @RequestMapping(value = "/moodindexPage")
    public String moodIndex() {
        return "moodIndex";
    }

    @RequestMapping(value = "/healthInfoAdd")
    public String healthInfoAddPage() {
        return "Manage_healthInfoAdd";
    }

    @RequestMapping(value = "/healthInfoSelect")
    public String healthInfoSelectPage() {
        return "Manage_healthInfoSelect";
    }

    @RequestMapping(value = "/moveInfoAdd")
    public String moveInfoAddPage() {
        return "Manage_moveInfoAdd";
    }

    @RequestMapping(value = "/moveInfoSelect")
    public String moveInfoSelectPage() {
        return "Manage_moveInfoSelect";
    }

    @RequestMapping(value = "/welcome")
    public String welcome() {
        return "Manage_welcome";
    }

    @RequestMapping(value = "/testrecord")
    public String testrecord(){
        return "testrecord";
    }

    @RequestMapping(value = "/healthnewsPage")
    public String healthnewsPage(){
        return "heahthynewsPage";
    }

    //修改个人信息
    @RequestMapping(value = "/updatePerson")
    public String updatePerson(){
        return "updatePerson";
    }



    @RequestMapping(value = "/healthUpdatePage")
    public String healthUpdatePage(@RequestParam(value = "health_id") String health_id, HttpSession session){
        session.setAttribute("health_id",health_id);
        return "Manage_healthInfoUpdate";
    }
    @RequestMapping(value = "/userManageSelect")
    public String userManageSelect(){
        return "userManageSelect";
    }
}
